package com.jdyfy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jdyfy.entity.Announcement;
import com.jdyfy.entity.User;
import com.jdyfy.mapper.AnnouncementMapper;
import com.jdyfy.service.AnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnnouncementImpl extends ServiceImpl<AnnouncementMapper, Announcement> implements AnnouncementService {
    @Autowired
    private AnnouncementMapper announcementMapper;

    //根据项目编号集合获取每个项目对应的公告信息
    public List<Announcement> getAnnouncementsByProjectNumbers(List<String> projectNumbers) {
        return announcementMapper.getAnnouncementsByProjectNumbers(projectNumbers);
    }

    //根据公告名称获取公告信息
    public Announcement getByAnnouncementName(String announcementName){
        return announcementMapper.getByAnnouncementName(announcementName);
    }
}
